This invention relates to a method of clearing a memory of a virtual machine which executes a clearing operation under the environment of the virtual machine when the memory assigned to the virtual machine is to be cleared.
Recently, the memory area assigned to the virtual machine has increased and thus the time required to clear the memory has also increased. Therefore, a technique is required which does not cause any inconvenience even if the time required to clear the memory is long. It is necessary in a virtual machine system to clear the virtual machine (called VM hereinafter) memory area to prevent a malfunction of an operating system (OS) and to prevent information of a previously operating OS from being given to the next-operating OS.
As a trigger to clear the VM memory, an IPL command of the OS or a VM-memory clear command, for example, are used. These commands are designated by an operator. A clear operation is also necessary upon completing a VM operation.
FIG. 1A (PRIOR ART) shows a conventional method of clearing a memory in the virtual machine system. Virtual machine system 10 comprises virtual machine control monitor 11 (called VM control monitor hereinafter), virtual machine dispatcher 14(called VM dispatcher hereinafter) for sequentially providing respective VMs with a CPU executing right in a time divisional manner, clearing program 15 and virtual machine areas 16-1 to 16-3 (called VM areas hereinafter) of a memory, which are assigned to respective VMs. Clearing program 15 for clearing a memory of the VM is conventionally provided in VM control monitor 11 and when a clear request for VM area 16-1 is produced, clearing program 15 operates to clear the area designated by the clear request within a continuous time period as shown in FIG. 1B (PRIOR ART).
A clear operation of clearing program 15, which operates as a part of command processes in VM control monitor 11, generally has a higher CPU executing priority right than a process for operating an OS on the VM. Therefore, in the conventional method, there is a problem that the other VMs cannot operate until a clear operation of VM area 16-1 is completed.
Furthermore, the size of the memory area assigned to the VM has increased and therefore the time required for a memory clear process has also increased. This sometimes prevents another VM from operating for a long period of time. For example, if a plurality of VMs perform a communication, a VM does not return a response within a predetermined time. As shown in FIG. 1C (PRIOR ART), VM area 16-1, for example, exclusively occupies the CPU of the particular system to clear the VM area 16-1 until the process of the clearing program for the VM area 16-1 is completed. Therefore, when the opposite VM in the same or different system tries to access VM area 16-1, VM area 16-1 of the predetermined system cannot send a response for a certain period of time. Therefore, the opposite VM erroneously recognizes that the VM has become abnormal.
In the prior art, VM control monitor 11 executes a clearing operation of the VM memory. Thus, there is a danger of an area other than the subject of the memory clear operation being destroyed by a malfunction of VM control monitor 11. FIG. 1C shows an explanatory view of a memory space regarding a guard of the VM control monitor and a guard of the VM. The guard for the VM control monitor is provided at the last address of the VM control monitor and under the VM control monitor are provided VM areas VM16-3, VM16-2, and VM16-1, for example. A guard of the VM control monitor is moved to the last address of the VM16-1 area so that the clearing program provided in the VM control monitor can clear the program in the VM16-1. Therefore, there is a problem that the clearing program erroneously clears the VM16-2 area as the clear process for the VM16-1 extends to the VM16-2.